package com.example.javaow.domain.base;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class BatchResult1 {
    private List<BatchResultEntry> successList = new ArrayList<>();
    private List<BatchResultEntry> failedList = new ArrayList<>();

    public BatchResult1(List<BatchResultEntry> entries) {
        for (BatchResultEntry entry : entries) {
            if (entry.isSuccess()) {
                successList.add(entry);
            } else {
                failedList.add(entry);
            }
        }
    }
}